import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 全局注册 element-plus 中使用的 icon 图标
// eslint-disable-next-line import/no-unresolved
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// import axios from 'axios'
// import router from './router'
// import store from './store'

// 引入 dayjs 中的国际化中文文案
import 'dayjs/locale/zh-cn'
// 全部引入 element-plus
import 'element-plus/dist/index.css'
//引入全局组件
import Page from './layout/index.vue'
import NoLogin from './layout/NoLogin.vue'
import App from './App.vue'
import router from './router/index'
import store from './store/index-2'

// import 'normalize.css'
const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})
app.component('Page',Page).component('NoLogin',NoLogin)
Object.keys(ElementPlusIconsVue).forEach(key => {
  app.component(key, ElementPlusIconsVue[key])
})
app.component('Page',Page)
app.use(router)
app.use(store)
// app.use(ElementPlus)

app.mount('#app')